import request from '@/utils/zyrequest'
import { getToken } from '@/utils/auth'

export default {
    // 查询归档记录列表】
    selectList(eTime, page, size) {
        return request({
            url: '/item/edition/editionData',
            method: 'get',
            params: {
                eTime: `${eTime}`,
                page: `${page}`,
                size: `${size}`
            },
            headers: {
                // 'token': getToken()
            }
        })
    },

    // 新增归档
    insert(pojo) {
        return request({
            url: '/item/edition/editionData',
            method: 'post',
            data: JSON.stringify(pojo),
            headers: {
                'Content-Type': 'application/json;charset=UTF-8',
                // 'token': getToken()
            }
        })
    },

    // 更新归档
    update(pojo) {
        return request({
            url: '/item/edition/editionData',
            method: 'put',
            data: JSON.stringify(pojo),
            headers: {
                'Content-Type': 'application/json;charset=UTF-8',
                // 'token': getToken()
            }
        })
    },

    // 删除归档
    delete(pojo) {
        return request({
            url: '/item/edition/editionData',
            method: 'delete',
            data: JSON.stringify(pojo),
            headers: {
                'Content-Type': 'application/json;charset=UTF-8',
                // 'token': getToken()
            }
        })
    }
}